package com.crm.jdy.common.pojo;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**   
 * @Description:(客户-联系人实体类)
 * 
 * @version: V1.0
 * @author: kong
 * 
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ClientChargeInfo extends Model<ClientChargeInfo> {

	private static final long serialVersionUID = 1616662543144L;

	@TableId(value = "charge_id", type = IdType.ID_WORKER_STR)
	@ApiModelProperty(name = "chargeId" , value = "联系人id")
	private String chargeId;

	@NotBlank(message = "联系人姓名非空")
	@ApiModelProperty(name = "chargeName" , value = "联系人姓名")
	private String chargeName;

	@ApiModelProperty(name = "chargePhone" , value = "联系人电话")
	private String chargePhone;

	@Email(message = "该值为邮箱")
	@ApiModelProperty(name = "chargeEmail" , value = "联系人邮箱")
	private String chargeEmail;

	@ApiModelProperty(name = "chargeTitile" , value = "联系人职位")
	private String chargeTitile;
    
	@ApiModelProperty(name = "chargeDecision" , value = "是否为关键决策人")
	private String chargeDecision;
    
	@ApiModelProperty(name = "chargeAddress" , value = "地址")
	private String chargeAddress;


	@ApiModelProperty(name = "chargeNextTime" , value = "下次联系时间")
	private String chargeNextTime;
    
	@ApiModelProperty(name = "chargeSex" , value = "性别")
	private String chargeSex;


	@ApiModelProperty(name = "chargeLastTime" , value = "最后一次联系时间")
	private String chargeLastTime;

	@JsonIgnore
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	@ApiModelProperty(name = "createTime" , value = "创建时间")
	@TableField(fill = FieldFill.INSERT)
	private Date createTime;

	@JsonIgnore
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	@ApiModelProperty(name = "updateTime" , value = "更新最新时间")
	@TableField(fill = FieldFill.INSERT_UPDATE)
	private Date updateTime;

	@JsonIgnore
	@TableLogic
	@ApiModelProperty(name = "isDelete" , value = "0正常  1删除")
	private Integer isDelete;

	@ApiModelProperty(name = "chargeCreatePerson" , value = "创建人")
	private String chargeCreatePerson;

	@NotNull(message = "客户id不为空")
	@ApiModelProperty(name = "parentId" , value = "客户下ID")
	private String parentId;

}
